﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
using SubSonic;
using System.Data;
using System.Data.SqlClient;

public partial class Controls_SelectCity : System.Web.UI.UserControl
{
    private string _VillageId;
    public string VillageId
    {
        get { return _VillageId; }
        set
        {
            _VillageId = value;
        }
    }
    private string _VillageName;
    public string VillageName
    {
        get { return _VillageName; }
        set
        {
            _VillageName = value;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
       
    }
   
    protected void DropDownListVillage_SelectedIndexChanged(object sender, EventArgs e)
    {
    
        GridViewVillageDetail.DataSource = DataAccess.TblVillage.FetchByParameter(DataAccess.TblVillage.Columns.Id,SubSonic.Comparison.Equals, DropDownVillage.SelectedItem.Value.ToString());
      
        GridViewVillageDetail.DataBind();
        _VillageId = DropDownVillage.SelectedItem.Value;
        _VillageName = DropDownVillage.SelectedItem.Text;
    }
}